import request from "@/utils/request";
//获取全部商品列表
export const getProductList = (params: any) => {
    return request({
        url: '/client/product/list',
        method: 'get',
        params: params

    })
}
//获取销量升序全部商品列表
export const getProductSoldlist = (params: any) => {
    return request({
        url: '/client/product/soldlist',
        method: 'get',
        params: params

    })
}
//获取新品升序全部商品列表
export const getCreateTimelist = (params: any) => {
    return request({
        url: '/client/product/soldlist',
        method: 'get',
        params: params

    })
}
//获取价格降序全部商品列表
export const getPriceAsclist = (params: any) => {
    return request({
        url: '/client/product/priceAscList',
        method: 'get',
        params: params

    })
}
//获取价格降序全部商品列表
export const getPriceDesclist = (params: any) => {
    return request({
        url: '/client/product/priceDescList',
        method: 'get',
        params: params

    })
}
//获取商品详情
export const getProductDetail = (id: number) => {
    return request({
        url: `/client/product/${id}`,
        method: 'get'
    })
}
//获取全部商品搜索列表
export const getProductSearchList = (params: any) => {
    return request({
        url: '/client/product/searchData',
        method: 'get',
        params: params
    })
}
